import request from '@/utils/processRequest';
// 获取名称
export function getName(data) {
  return request({
    url: '/govDing/getName',
    method: 'post',
    data
  });
}
// 登录

export function login(data) {
  return request({
    url: '/mLogin/login',
    method: 'post',
    data
  });
}
export function getMenuList(data) {
  return request({
    url: '/menu/getList',
    method: 'post',
    data
  });
}
// 获取头像接口
// export function showAvatar(data) {
//   return request({
//     url: '/dingTalk/showAvatar',
//     method: 'post',
//     data
//   });
// }

// 获取浙政钉
export function showAvatar(data) {
  return request({
    url: '/govDing/getAvatar',
    method: 'post',
    data
  });
}

// export const GET_FILE_URL = "file/getfile";
export const GET_FILE_URL = 'file/downloadById';

export function getFile(params) {
  return request({
    method: 'get',
    url: GET_FILE_URL,
    params,
    responseType: 'blob'
  });
}

export function getFileList(data) {
  return request({
    url: 'file/page',
    data,
    method: 'post'
  });
}

export function getAppList(data) {
  return request({
    url: '/app/selappByPosition',
    data,
    method: 'post'
  });
}

export function qrLogin(data) {
  return request({
    url: '/mLogin/qrLogin',
    data,
    method: 'post'
  });
}

// 获取【SYS_ENTERPRISE的单位列表】

export function getUnit(data) {
  return request({
    url: '/enterprise/getUnit',
    data,
    method: 'post'
  });
}

export function listOptions(data) {
  return request({
    url: '/option/app/listOptions',
    method: 'post',
    data
  });
}
